package com.lmxdawn.api.common.autoconfigure;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

/**
 * session 配置
 * <p>
 *
 * @author
 * @since 2023-11-28 13:59
 */
@Getter
@Setter
@ConfigurationProperties(prefix = "bp.session")
public class SessionProperties {
    
    /**
     * Token 名称
     */
    private String tokenName = "Authorization";
    
    /**
     * token前缀，例如填写 Bearer 实际传参 tokenName: Bearer xxxx-xxxx-xxxx-xxxx
     */
    private String tokenPrefix = "Bearer";
    
    /**
     * 不拦截URL
     */
    private List<String> ignoreUrls = new ArrayList<>();
    
    /**
     * 网页端会话超时时间，默认3小时，单位秒
     */
    private Long webTimeout = 7*24*60*60L;
    
}
